package com.zl.learning.thread.thread_local;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhaolei on 2017/5/16.
 */
public class TestThreadLocal {
    private static ThreadLocal<Map<String,String>> mt = ThreadLocal.withInitial(() -> {
        Map<String,String> m = new HashMap<>();
        m.put("a","AAAA");
        return m;
    });

    private static String userName = "BBBBBB";

    public static ThreadLocal<Map<String, String>> getMt() {
        return mt;
    }

    public static void setMt(ThreadLocal<Map<String, String>> mt) {
        TestThreadLocal.mt = mt;
    }

    public static String getUserName() {
        return userName;
    }

    public static void setUserName(String userName) {
        TestThreadLocal.userName = userName;
    }
}
